package com.question.business.org.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.question.business.org.entity.Org;
import com.question.business.org.model.ao.OrgDropDownAO;
import com.question.business.org.model.ao.OrgPageAO;
import com.question.business.org.model.vo.OrgDropDownVO;
import com.question.business.org.model.vo.OrgVO;
import com.question.common.annotation.DataConvert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 机构Mapper接口
 *
 * @author star
 * @since 2023-09-14
 */
@Mapper
public interface OrgMapper extends BaseMapper<Org> {
    /**
     * 机构分页查询
     *
     * @param page 分页参数
     * @param ao   请求参数
     * @return Page<OrgVO> 响应参数
     */
    @DataConvert
    Page<OrgVO> queryOrgPage(Page<OrgVO> page, @Param("ao") OrgPageAO ao);

    /**
     * 机构下拉列表查询
     *
     * @param ao 请求参数
     * @return List<OrgDropDownVO> 响应参数
     */
    List<OrgDropDownVO> queryOrgDropDown(OrgDropDownAO ao);
}